1. Field of the Invention
The present invention relates to a storage device, a method of processing stored data and an image forming apparatus, and more particularly to a storage device which is capable of storing so-called backup data, a method of processing stored data so as to restore the stored data, and an image forming apparatus equipped with the storage device.
2. Description of the Related Art
Various systems, such as an image forming apparatus typically represented by a copying machine, are equipped with a semiconductor storage device capable of reading and writing data, and these systems read stored data from the storage device and write new data to the storage device.
As conventional storage elements for this type of storage device, volatile memories such as a dynamic RAM (Dynamic Random Access Memory; hereinafter referred to as xe2x80x9cDRAMxe2x80x9d) and a static RAM (Static Random Access Memory; hereinafter referred to as xe2x80x9cSRAMxe2x80x9d) have been used.
However, while these volatile memories have an advantage of reading and writing data at high speed, they cannot hold data stored therein when supply of the source voltage is interrupted. Thus, to keep the data stored in the memory in the event that the external power supply is stopped, the system needs to have a backup power supply incorporated therein, and this leads to an increased cost.
Further, the backup power supply is usually formed of a battery, capacitors, and other parts, and how long the volatile memory can be supplied from the power supply depends on the capacity of the battery and the capacity of the capacitors, thus limiting the stored data holding time of the memory.
To give a solution to this inconvenience, a nonvolatile memory capable of rewriting data is now used.
As the nonvolatile memory, a fixed memory such as a mask ROM (Mask Read-Only Memory) that allows data to be written during a semiconductor fabrication process thereof but cannot erase stored data has been generally used. However, the mask ROM is recently replaced by an EEPROM (Electrically Erasable and Programmable Read-Only Memory) that can electrically erase and write data over hundreds to tens of thousands of times.
The EEPROM can hold stored data even when supply of power is stopped, whereby the system is no longer required to have an incorporated backup power supply. Further, the data within the EEPROM can be electrically erased and rewritten, whereby the stored data can be modified with the EEPROM residing in the system.
However, the EEPROM needs a longer time in rewriting data than volatile memories such as a DRAM, and hence is not suitable for systems demanding high speed updating of data.
To overcome this shortcoming, a backup storage device is used, which is composed of both the above-mentioned volatile memory and the EEPROM as the nonvolatile memory to complement each other for their drawbacks.
As long as source voltage is supplied from an external source, this storage device expands data stored in the EEPROM onto the volatile memory at corresponding addresses, and when the system requests to read and write the stored data, the volatile memory processes such requests. Further, when the system requests to back up the data expanded on the volatile memory and/or to stop supply of the source voltage from the external source, the storage device writes the data expanded on the volatile memory back into the EEPROM, whereby the system holds the stored data.
The storage device having both types of memories, the volatile memory and the EEPROM, has a plurality of EEPROMs since the storage capacity of a single EEPROM may not be large enough to back up all desired stored data. Further, its volatile memory is divided into a plurality of memory areas, and data stored in the divided memory areas are sequentially transferred to the EEPROMs for storage in such a manner that data in each divided memory area is transferred to each of the EEPROMs, whereby the storage device backs up the stored data.
Further, when data stored in one of the EEPROMs are destroyed for some internal or external causes, the destroyed data in the EEPROM in question is expanded onto one of the memory areas of the volatile memory and stored there as unintelligible undefined data. As a result, a system provided with a motor or an actuator in particular is likely to undergo a runaway, a malfunction or the like.
Thus, when the stored data within any of the EEPROMs is destroyed for some cause as mentioned above, a technique is also used to expand onto the volatile memory initial data stored in a fixed memory such as a mask ROM within the storage device.
However, in the above-mentioned conventional storage device, the plurality of EEPROMs provided in the storage device for backup of data have their addresses not correlated to those of the volatile memory, and hence, when the stored data in the volatile memory are backed up in the EEPROMS, they are written to arbitrary EEPROMs. Therefore, if all the EEPROMs having stored backup data are detached from the storage device body, the EEPROMS are remounted into the storage device in an arbitrary order, and the backup data in the reattached EEPROMs are expanded onto the volatile memory, the volatile memory is likely to store at each of their addresses data that is different from what it was at the same address before the backup, thus adversely affecting the system.
Further, in the above-mentioned conventional storage device, the initial data pre-stored in the mask ROM is expanded onto all the memory areas of the volatile memory even if data in only one of the EEPROMs is destroyed, and thus it takes time to restore the data.
Furthermore, when an image forming apparatus, such as a copying machine, is used as a system on which the above storage device is mounted, it uses variable data including the count of copies and printouts produced, the size and direction of papers stored in sheet feed cassettes and correcting values and user-set values, for example. Even when external power supply to the storage device storing these variable data is interrupted, these variable data must be retained in the storage device so that the storage device can start its operation smoothly when the power supply is again started. Thus, special measures must be taken to enable the storage device used in the image forming apparatus to cope even with the interruption of its external power supply.
The present invention has been made in view of these circumstances, and it is therefore an object of the present invention to provide a storage device, a method of processing stored data, and an image forming apparatus, which are capable of restoring backup data in a predetermined order and avoiding damage from being given to the system even when the backup data are destroyed.
To attain the above object, in a first aspect of the present invention, there is provided a storage device comprising first storage means used exclusively for reading stored data, second storage means formed of a volatile memory and being capable of reading and writing the stored data, and a plurality of third storage means formed of nonvolatile memories for holding the stored data in the second storage means as backup data, wherein the plurality of third storage means has respective identifiers unique thereto, and each of the first and second storage means is divided into a plurality of storage areas corresponding in number to at least a number of the plurality of third storage means, the storage areas obtained by dividing the first storage means having respective identifiers unique thereto, and the storage device comprises loading means for loading each of the identifiers unique to the plurality of third storage means into one of the storage areas obtained by dividing the second storage means, collating means for collating the identifiers unique to the third storage means stored in the second storage means with the identifiers unique to the storage areas obtained by dividing the first storage means, and stored data transfer means for transferring contents in the third storage means which are related to one of the identifiers unique to the third storage means to one of the storage areas of the second storage means when the collating means determines that the one of the identifiers unique to the third storage means matches with one of the identifiers unique to the storage areas obtained by dividing the first storage means.
Preferably, the collating means sequentially collates the identifiers unique to the third storage means stored in the second storage means with the identifiers unique to the divided storage areas of the first storage means.
Also preferably, the storage device comprises an abnormality diagnosing means for determining whether or not any of the plurality of third storage means is abnormal, upon completion of collation of all of the identifiers unique to the third storage means with all of the identifiers unique to the divided storage areas of the first storage means by the collating means.
More preferably, the abnormality diagnosing means comprises determining means for determining whether or not stored data in one of the divided storage areas of the second storage means matches with the identifier of a corresponding one of the plurality of third storage means, and abnormality determining means for determining that the corresponding one of the plurality of third storage means is abnormal when a result of the determination made by the determining means is negative.
Preferably, the storage device comprises display means for displaying a result of the determination made by the abnormal diagnosing means.
Also preferably, the storage device comprises an alarming means for sounding an alarm when the abnormality diagnosing means determines that any of the plurality of third storage means is abnormal.
The plurality of third storage means are dismountably mounted in the main body of the storage device.
Further, to attain the above object, in a second aspect of the present invention, there is provided a method of processing stored data in a storage device including first read-only storage means for use in reading stored data, second storage means formed of a volatile memory and capable of reading data stored therein and writing data thereinto, a plurality of third storage means formed of nonvolatile memories for holding the data stored in the second storage means as backup data, each of the plurality of third storage means has an identifier unique thereto, and each of the first and second storage means is divided into a plurality of divided storage areas corresponding at least to a number of third storage means, each of the divided storage areas having an identifier unique thereto, the method comprising a loading step of loading the identifiers unique to the plurality of third storage means into the divided storage areas of the second storage means, a collating step of collating each of the identifiers unique to the third storage means stored in the second storage means with each of the identifiers unique to the divided storage areas of the first storage means, and a stored data transfer step of transferring contents in the third storage means which are related to one of the identifiers unique to the third storage means to one of the divided storage areas of the second storage means which has an identifier identical with the one of the identifiers unique to the third storage means when it is determined in the collating step that the one of the identifiers unique to the third storage means matches with the one of the identifiers unique to the divided storage areas of the first storage means.
With the above arrangements of the first and second aspects, according to the present invention, it is determined whether or not the identifier of each of the plurality of third storage means matches with the identifier of any of the plurality of divided storage areas of the second storage means, and when the former matches with the latter, backup data in the third storage means is expanded onto the divided storage area of the second storage means. As a result, even if the plurality of third storage means are mounted in the storage device body in an arbitrary order, the possibility that the system such as an image forming apparatus is damaged can be avoided.
That is, even in the case where the data stored in the second storage means are backed up in the plurality of third storage means, and the third storage means are detached from the storage device body and then remounted into the storage device body in an order different from that at the time of their detachment, the data can be easily restored to what they were before their backup, in the second storage means. As a result, even when a serviceman or the like mistakes the proper order of mounting of the plurality of third storage means, the system such as an image forming apparatus can be operated without damage.
Further, in a third aspect of the present invention, there is provided an image forming apparatus provided with the above storage device.
Still further, since the storage device is thus provided with the abnormality detecting means, any of the plurality of third storage means whose backup data is destroyed can be located easily.